using UnityEngine;
using QFramework;

namespace ProjectSurvivor
{
	public partial class Exp : PowerUp
	{

		void OnTriggerEnter2D(Collider2D other)
		{
			//是玩家的圆形检测区域
			if (other.GetComponent<CollectableArea>())
			{
				FlyingToPlayer = true;

			}
		}
		
        protected override void Execute()
		{
			AudioKit.PlaySound("Exp");
			//经验提升
			Global.Exp.Value++;
			//删除
			this.DestroyGameObjGracefully();
		}
		protected override Collider2D Collider2D => selfCollider2D;
	}
}
